const path = require('path');
const { defineConfig } = require('@vue/cli-service')




function resolve(dirPath) {
  return path.join(__dirname,dirPath)
}

module.exports = defineConfig({
 
  lintOnSave:false,// 这里我把eslent关了，到代码跑通后，可以再开启检查，注意重启服务器
  publicPath:"./", // 控制打包后引入文件路径的前缀
  transpileDependencies: true,
  devServer: {
    setupMiddlewares(middlewares,devServer) {
      
     
      return middlewares;
    },
    proxy: {
      '/fcj' : {
        target: 'http://localhost:1798',
        changeOrigin: true,
      }
    },
    port:3851
  },
  chainWebpack:(config)=>{
    config.resolve.alias
    config.resolve.alias
    .set('@',resolve('./src'))
    .set('@utils',resolve('./src/utils'))
    .set('@style',resolve('./src/style'))
    .set('@components',resolve('./src/components'))
    .set('@pages',resolve('./src/pages'))
    .set('@assets',resolve('./src/assets'))
    .set('@mixins',resolve('./src/mixins'))//混合器的路径
  }
});
